module constants
!Defines numerical constants
!Use at least 33 digits in order to avoid errors when using quad precision
    implicit none
    save
    integer,parameter   :: wp = 8
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |1        |10       |20       |30       |40
    real(wp),parameter  ::  ZERO      = 0.0_wp
    real(wp),parameter  ::  ONE       = 1.0_wp
    real(wp),parameter  ::  TWO       = 2.0_wp
    real(wp),parameter  ::  THREE     = 3.0_wp
    real(wp),parameter  ::  HALF      = 0.5_wp    
    real(wp),parameter  ::  QUARTER   = 0.25_wp    
    real(wp),parameter  ::  PI        = 3.1415926535897932384626433832795028841972_wp
    real(wp),parameter  ::  TWOPI     = 6.28318530717958647692528676655900576839_wp
    real(wp),parameter  ::  FOURPI    = 12.5663706143591729538505735331180115368_wp
    real(wp),parameter  ::  PIHALF    = 1.5707963267948966192313216916397514420986_wp
    real(wp),parameter  ::  PIINV     = 0.31830988618379067153776752674502872406892_wp
    real(wp),parameter  ::  PIQUARTER = 0.78539816339744830961566084581987572104929_wp
    real(wp),parameter  ::  ONETHIRD  = 0.33333333333333333333333333333333333333333_wp
    real(wp),parameter  ::  ONESIXTH  = 0.16666666666666666666666666666666666666666_wp
    real(wp),parameter  ::  ONEEIGTH  = 0.125_wp
    real(wp),parameter  ::  LN2       = 0.6931471805599453094172321214581765680755_wp
    real(wp),parameter  ::  LN4       = 1.38629436111989061883446424291635313615100_wp
    real(wp),parameter  ::  SQRT2     = 1.4142135623730950488016887242096980785697_wp
    real(wp),parameter  ::  SQRT3     = 1.73205080756887729352744634150587236694_wp
    real(wp),parameter  ::  EXP1      = 2.7182818284590452353602874713526624977572_wp    
    real(wp),parameter  ::  DEG2RAD   = 0.0174532925199432957692369076848861271344_wp
    real(wp),parameter  ::  RAD2DEG   = 57.2957795130823208767981548141051703324_wp
    real(wp),parameter  ::  EPSILON0  = 8.854187817e-12_wp
    real(wp),parameter  ::  MU0       = 12.5663706143591729538505735331180115368e-7_wp
    real(wp),parameter  ::  C0        = 299792458.0_wp
    real(wp),parameter  ::  ETA0      = MU0*C0
end module constants
